package com.dbiservices.dbiworker.ui.action;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

@SuppressWarnings("serial")
public class Action extends AbstractAction{
	
	public static final int A_QUIT				= 1;
	
	private int actionType;
	
	public Action(String name, int type) {
		super(name);
		this.setActionType(type);
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		switch (this.getActionType()){
			case A_QUIT : System.exit(0);break;
			default: break;
		}
	}

	public int getActionType() {
		return this.actionType;
	}

	public void setActionType(int actionType) {
		this.actionType = actionType;
	}

}
